package com.performax.database.Dao;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.performax.database.Vo.*;
import com.performax.database.oh2game.mapper.AdInfoMapper;

@Service(value = "oh2gameAdDao")
public class Oh2GameAdDao {
	
	@Resource(name = "adinfoMapper")
	private	AdInfoMapper adinfoMapper;
	
	public List<BiInfoVo> getBiList(){
		return this.adinfoMapper.getBiInfo();
	}
	
	public List<RollingInfoVo> getRollingBanner(){
		return this.adinfoMapper.getRollingInfo();
	}
	
	public PopupInfoVo getPopupInfo(String type){
		List<PopupInfoVo>	popupInfo	=	this.adinfoMapper.getPopupInfo(type);
		
		if(popupInfo	==	null){
			return null;
		}else{
			if(popupInfo.size()	>	0)	{
				return popupInfo.get(0);
			}else{
				return null;
			}
		}
	}
}
